package Demo;

public abstract class Animal implements Simulator{
    String name;

    public Animal(String name) {
        this.name = name;
    }

    public Animal() {

    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName(){
        return name;
    }
    public void cry(){}

    public String getAnimalName(){
        return name = this.getName();
    }

    @Override
    public void playSound(Animal animal) {
        animal.cry();
    }
}
